<template>
     <el-table :data="tableData" border=""  style="width: 100%" height="250">
       <el-table-column fixed="" label="日期" prop="date" width="100"></el-table-column>
       <el-table-column label="姓名" prop="name" width="150"></el-table-column>
       <el-table-column label="省份" prop="province" width="100"></el-table-column>
       <el-table-column label="市区" prop="city" width="150"></el-table-column> 
       <el-table-column label="地址" prop="address" width="250"></el-table-column> 
       <el-table-column label="邮编" prop="zip" width="150"></el-table-column> 
       <el-table-column fixed="right" label="操作" width="100">
        <template slot-scope="scope">
              <el-button type="text" @click="handleClick(scope.row)" size="small">查看</el-button>
              <el-button type="text" size="small">编辑</el-button> 
        </template>
       </el-table-column>   
     </el-table>
</template>


<script>
export default {
  methods:{
      handleClick(row){
        console.log(row);
      }
  },
  data(){
    return{
       tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        },
        {
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        },
        {
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        },
        {
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        },
        {
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        },
        {
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }]
    }
  }
}
</script>

